- This topic has 10 replies, 2 voices, and was last updated 20 years ago by
Riyad Kalla.
-
AuthorPosts
-
martin_johnny1978MemberCould anyone help in opening a war and deploy it as a seperate project.
June 28, 2005 at 3:17 pm #231866
Riyad KallaMemberWAR’s are typically the “binary” format of your project in that they usually don’t include source code for your classes. Does your WAR contain source code and you just want to convert it into a MyEclipse project?
June 28, 2005 at 3:18 pm #231867
martin_johnny1978MemberI have a war file in c:/test.war . I need to open it in eclipse and deploy it. Could any one help me in this ?
June 28, 2005 at 3:21 pm #231869
Riyad KallaMemberIf you would like help please answer my questions. Your last post was a restatement of your first post.
June 28, 2005 at 3:25 pm #231871
martin_johnny1978MemberSorry about that.
YES the war file contains source code and i just want to convert in to a MyEclipse project.
ThanksJune 28, 2005 at 3:35 pm #231873
Riyad KallaMemberQuick way:
1) File > New > Project > Web Project
2) Grab the root of your source tree and drop it into the /src dir.
3) Grab the root of the WAR file (has JSPs in it, your WEB-INF dir in it, etc.) and drop it into your WebRoot dir, say yes to overwriting everything.4) Double check that /src is your Source dir and that /WebRoot/WEB-INF/classes is your output dir.
5) Double check that every library in your /WebRoot/WEB-INF/lib dir was added to your build path.Viola, all done.
June 28, 2005 at 3:48 pm #231877
martin_johnny1978MemberI’m not getting it.
This is struts application, the directory structure in detail isLogon(projname)
–dist
–META-INF
–pages
Logon.jsp
Welcome.jsp
–WEB-INF
classes
dist
doc
lib
src
java
build.xml
struts.tld
struts-bean.tld
struts-config.xml
struts-form.xml
struts-html.xml
struts-logic.xml
struts-template.xml
web.xml
–index.jspCan you help me in getting this in MyEclipse proj.?
June 28, 2005 at 3:54 pm #231878
martin_johnny1978MemberSorry it should look like this
Logon(projname)
–dist
–META-INF
–pages
—-Logon.jsp
—-Welcome.jsp
–WEB-INF
—-classes
—-dist
—-doc
—-lib
—-src
——java
——build.xml
—-struts.tld
—-struts-bean.tld
—-struts-config.xml
—-struts-form.xml
—-struts-html.xml
—-struts-logic.xml
—-struts-template.xml
—-web.xml
–index.jspJune 28, 2005 at 4:15 pm #231881
Riyad KallaMemberMartin, what I said still applies to this:
1) Unzip your war file someplace
2) Go into that dir, hit CTRL-A to select all the files
3) Switch back to a NEW Web Project, select the WebRoot dir, right click and select Paste.
4) In Eclipse, drill down to your WebRoot/WEB-INF/src dir, grab everything in that dir and drop it in your top level /src dir, and erase that stray /src dir.Then open up your project preferences and make sure all the JARs in your WebRoot/WEB-INF/lib dir are in your build path, and you are done.
June 28, 2005 at 7:36 pm #231896
martin_johnny1978Memberhi Riyad,
Thanks for ur support,
I’m getting an error in the following jsp with error description
The end tag “</logic:notPresent” is unbalanced.
I’m not getting the error if i deploy the application directly thru tomcat.
I get it only in eclipse editor.
————————————————————————————<%@ taglib uri=”/tags/struts-bean” prefix=”bean” %>
<%@ taglib uri=”/tags/struts-html” prefix=”html” %>
<%@ taglib uri=”/tags/struts-logic” prefix=”logic” %>
<HTML>
<HEAD>
<TITLE>Welcome!</TITLE>
<html:base/>
</HEAD>
<BODY>
<logic:present name=”user”>
<H3>Welcome <bean:write name=”user” property=”username”/>!</H3>
</logic:present>
<logic:notPresent scope=”session” name=”user”>
<H3>Welcome World!</H3>
</logic:notPresent>
<html:errors/>
<UL>
<LI><html:link forward=”logon”>Sign in</html:link></LI>
<logic:present name=”user”>
<LI><html:link forward=”logoff”>Sign out</html:link></LI>
</logic:present>
</UL>
<IMG src=’struts-power.gif’ alt=’Powered by Struts’>
</BODY>
</HTML><%–
If user is logged in, display “Welcome ${username}!”
Else display “Welcome World!”
Display link to log in page; maintain session id if needed.
If user is logged in, display a link to the sign-out page.Note: Only the minimum required html or Struts custom tags
are used in this example.–%>
June 28, 2005 at 10:27 pm #231902
Riyad KallaMemberTry and right click on your project, go to MyEclipse > Remove all Error Markers, then go to the Project menu item and select “Clean” and have it rebuild your project. Did it popup again? What line exactly was it marking?
-
AuthorPosts