Eclipse helios Servlet creation wizard fields are blank - servlets

Am trying to create a simple servlet using servlet creation wizard in helios(eclipse). A popup opens up and when I type the class-name, at the top of the popup I can view a red cross mark which says 'The Source folder cannot be empty'. There is Browse bttn available, so when I click and go there, a popup opens but do not allow me to select anything in it. Please help me in this. Thanks

Creating Servlets by wizard only work for projects of type Dynamic Web Project. Truncate your current project and recreate it using New > Project > Web > Dynamic Web Project wizard.

Related

Update asp.net WebService reference from wsdl file?

Is it possible in asp.net to update or create a web service reference from a wsdl file on our local drives?
If so, could you please describe it ?
Follow these steps.
Open the Solution/Project in Visual Studio
Right Click on Solution Explorer on the project for which you want to add web reference.
Select Add Service Reference. (This will open a Add Service Reference dialogue box.)
Click on Advanced... button located at bottom of the dialogue box. (This will open another dialogue box named Service Reference Settings.)
Click on Add Web Reference button located at bottom of the dialogue box. (Again a dialogue box Add Web Reference would appear.)
Enter OR Copy & Paste full path for the WSDL file from your local drive as the URL.
Click on Go button besides the URL box.
Edit Web Reference Name if you want to.
Click on Add Reference.
And you are done.
It's been long time from accepted answer. If you are using VS2019 you can simply click on the service and select "Update..."
No need to add the service as Web Reference. You can do it setting the "Address" Field as the path of the file, for e.g.:
c:\contracts\mycontract.xml
and then "Go".

toolbar button to upload to Netsuite? (in Aptana Studio 3)

I have Aptana Studio 3, build: 3.0.9.201202141038
I'm using it to edit some Netsuite client scripts (javascript). The netsuite plugin lets me upload scripts to netsuite, which is great, but I have to right click on the filename in the project explorer, pick "Netsuite" and then "Upload"... too many clicks.
What I want is one button to stick on the toolbar that will do the upload. Is this customization possible? Not that I'm lazy but when debugging it becomes a pain to do so much right-clicking.
In Eclipse/Aptana, the "Project Explorer" can do this. If you select a project and/or file within that project, the "Upload" buttons are made available IF you have set up a remote connection to that project.
I am not certain if your uploads/pushes to Netsuite are via FTP but, if they are, just add your remote connection to the project. To do this, expand your project folder the project in the Project Explorer view and then right-click on the Connections icon to add a new (FTP) connection.Once this is setup, any file selected in the Project Explorer can be uploaded with a simply button click from this view.
Not sure if that is exactly what you want but, in the meantime, might get you closer to it!
Hit ctrl+shift+; and the file will save and upload.

Convert website to webapplication (User Controls)

I'm developing a website in asp.net and now I need to convert it to a webapplication.
I created a new project with a new webapplication template and copy me files. I did a right click in the sollution and convert to webapplication and it worked fine, the vs2010 has created a design.vb files for each webform and it's good.
But, there are some webforms that uses some user controls and this user control doesn't created the declation in design.vb. I'd like to know if is there any way to fix the declations in webform to a my desing file to be used in code-behine ???
Thanks
You can right click on each user control and select Convert To Web Application (or something like that) individually to generate the designer files.
There is no easy way to do this through VS. You can alternatively try ReSharper's Adjust Namespace functionality.

generating a dll of a web usercontrol

How can I make a dll of my web application usercontrol?
I have usercontrol222.ascx, but I want to make a dll out of this usercontrol.
Create a project containing only your user control ("usercontrol222.ascx") and grab the control's dll from the deployment of your new project. Here's the source of this method with a more complete explanation: Turning an .ascx User Control into a Redistributable Custom Control (Notable excerpts below, see the link for the full run-down).
Step 3: Use the Publish Command to Precompile the Site
The next step is to use the new
Publish command to precompile your
site and turn your user control into a
potential custom control. You'll find
the command under Build / Publish Web
Site. In the Publish dialog, do the
following:
Pick a Target Location. This is the location on your hard drive that your
site will be precompiled to.
Deselect "Allow this precompiled site to be updatable". In updatable
mode, only the code behind file (if
any) would get compiled, and the ascx
would be left unprocessed. This is
useful in some scenarios, but is not
what you want here since you want the
resulting DLL to be self-contained.
Select "Use fixed naming and single page assemblies". This will guarantee
that your user control will be
compiled into a single assembly that
will have a name based on the ascx
file. If you don't check this option,
your user control could be compiled
together with other pages and user
controls (if you had some), and the
assembly would receive a random name
that would be more difficult to work
with.
Step 4: Finding the Resulting Custom Control
Now, using the Windows
Explorer or a command-line window,
let's go to the directory you
specified as the target so we can see
what was generated. You will see a
number of files there, but let's focus
on the one that is relevant to our
goal of turning the user control into
a custom control.
In the "bin" directory, you will find
a file named something like
App_Web_MyTestUC.ascx.cdcab7d2.dll.
You are basically done, as this file
is your user control transformed into
a custom control! The only thing
that's left to do is to actually use
it.
You cannot. User controls are for the simplified scenario where you do not want to create a custom control. They have the disadvantage that the .ascx file and any other artifacts (images, styles, etc) must be included in each web site that uses the user control.
If you need complete reuse between projects, then you need to create a custom control. That's not actually that hard, if you directly translate the user control into a custom control.
You may want to look at developing your own server controls. See the following similar discussion: ASP.NET Web User Control Library.

Referencing code in VB.NET

I'm not at all familiar with VB.NET or ASP. I need to create a simple page which makes a call to a remote web service. I used the wsdl utility which comes with the DotNet SDK to generate a service proxy and write it to a VB file. Unfortunately I have no idea how to reference this code in either my ASPX file or the code behind VB file so I can create an instance of the proxy.
Edit: I should have qualified this by noting that I'm not using visual studio. I just coded up a .aspx with a .vb behind it and dropped it into an IIS location. Is there a way to do what you're suggesting outside of VS?
You need to add this code into your project so that it can be consumed.
Right click on your App_Code folder and select "Add Existing Item". This will bring up explorer. Use it to select the generated file and it will add it to your project.
Now you will be able to reference this code from within your page or code behind file
If there isn't an App_Code folder in your project, then right click on the project in solution explorer and select "Add New ASP.Net Folder"->App_Code
Or, instead of the wsdl utility:
In the solution explorer windows, r-click on the project, and select "add web reference". In the dialog that comes up, put in the url to the web service. In the web reference name box (lower right of that dialog), put in whatever you want to local alias for the service to be called.
So, if you put in a url of:
http://otherserver.com/otherservice.asmx
And, a web reference name of:
xyz
To use it, your code would look like:
dim x as new xyz
var = x.methodname()

Resources